package com.lock.pessimisticLock.service;

import java.util.ArrayList;

class Log {
    private ArrayList logs = new ArrayList();

    synchronized void write(String text) {
        logs.add(text);
    }

    void print() {
        for (Object log : logs) {
            System.out.println(log);
        }
    }
}
